
package io.fredia.femicro.tool.config;

import java.io.IOException;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.fredia.femicro.tool.search.lucene.LuceneDao;

/**
 * lucnece配置
 * 
 * @author : Fredia
 * @since : 2018年3月16日
 * @version : v1.0.0
 */
@Configuration
public class LuceneConfiguration {
	@Value("${search.lucence.path}")
	private String lucencePath;

	@Bean
	public LuceneDao luceneUtil() throws IOException {
		LuceneDao luceneDao = new LuceneDao();
		luceneDao.setIndexDer(lucencePath);
		return luceneDao;
	}

}
